/* 
 * Class Vector2
 */		
function Vector2(x, y) {
	if(arguments.length === 1) {		
		this.x = x.x;
		this.y = x.y;		
	}
	else {
		this.x = x;
		this.y = y;		
	}		
}

Vector2.prototype.translate = function(deltaX, deltaY) {
	if(deltaY !== "undefined") {
		this.x += deltaX;
		this.y += deltaY;				
	}	
}

Vector2.prototype.translate = function(deltaX, deltaY) {
	if(arguments.length === 1) {
		this.x += deltaX.x;
		this.y += deltaX.y;			
	}
	else {
		this.x += deltaX;
		this.y += deltaY;
	}
}

Vector2.prototype.move = function(x, y) {
	if(arguments.length === 1) {		
		this.x = x.x;
		this.y = x.y;		
	}
	else {
		this.x = x;
		this.y = y;		
	}			
}

Vector2.prototype.toString = function() {
	return this.x + ", " + this.y;
}	